# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-arpeggio
pkgver=2.0.0
pkgrel=2
pkgdesc="Packrat parser interpreter"
url="https://github.com/textX/Arpeggio"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-pytest-runner' 'python-setuptools' 'python-wheel')
source=("https://github.com/textX/Arpeggio/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('b5a75eea515b7dd0ad7dc261703300bd5b3e5a70f0946845f8828dbf7c76613aef926fed9538fe0f9a71c1666edc9f8cff31afddd551bea1d7b1b9ad7a9cc405')

build() {
  cd Arpeggio-$pkgver
  python setup.py build
}

check() {
  cd Arpeggio-$pkgver
  python setup.py pytest
}

package() {
  cd Arpeggio-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
